﻿using System;
using System.Collections.Generic;

namespace Illusion.Extensions
{
	// Token: 0x02000318 RID: 792
	public static class ListExtensions
	{
		// Token: 0x060013F5 RID: 5109 RVA: 0x0008CFE0 File Offset: 0x0008B1E0
		public static T Peek<T>(this IList<T> self)
		{
			return self[0];
		}

		// Token: 0x060013F6 RID: 5110 RVA: 0x0008CFEC File Offset: 0x0008B1EC
		public static T Pop<T>(this IList<T> self)
		{
			T result = self[0];
			self.RemoveAt(0);
			return result;
		}

		// Token: 0x060013F7 RID: 5111 RVA: 0x0008D00C File Offset: 0x0008B20C
		public static void Push<T>(this IList<T> self, T item)
		{
			self.Insert(0, item);
		}

		// Token: 0x060013F8 RID: 5112 RVA: 0x0008D018 File Offset: 0x0008B218
		public static T Dequeue<T>(this IList<T> self)
		{
			T result = self[0];
			self.RemoveAt(0);
			return result;
		}

		// Token: 0x060013F9 RID: 5113 RVA: 0x0008D038 File Offset: 0x0008B238
		public static void Enqueue<T>(this IList<T> self, T item)
		{
			self.Add(item);
		}
	}
}
